import React from 'react';
import { Tooltip } from 'antd';
import { history } from 'umi'
import BizIcon from '@/components/BizIcon';
import AuthComponent from '@/utils/auth/AuthComponent';

export default function SalaryCommLink({ title = '查看薪资沟通详情', type = 'chakanfabuxinxi', params = {} }) {
    return (
        <AuthComponent code="office:recruitment:course:hire:communicateDetail">
            <Tooltip title={title}>
                <BizIcon
                    type={type}
                    style={{ cursor: 'pointer' }}
                    onClick={() => {
                        history.push({
                            pathname: '/office/personnelManagement/recruitment/hire/detail',
                            query: params
                        });
                    }}
                />
            </Tooltip>
        </AuthComponent>
    );
}
